package com.woniuxy.lrz.carlproject.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.woniuxy.lrz.carlproject.controller.form.formgoods.GoodsInfoAOUForm;
import com.woniuxy.lrz.carlproject.controller.form.formgoods.GoodsInfoFindForm;
import com.woniuxy.lrz.carlproject.model.GoodInfo;
import com.baomidou.mybatisplus.extension.service.IService;
import com.woniuxy.lrz.carlproject.service.dto.dtocar.CarDetailsTypeBrandDto;
import com.woniuxy.lrz.carlproject.service.dto.dtogoods.GoodsCarAndAttachDto;
import com.woniuxy.lrz.carlproject.service.dto.dtogoods.GoodsInfoByServiceAndCarDto;
import com.woniuxy.lrz.carlproject.service.dto.dtogoods.GoodsInfoDto;

import java.util.List;

/**
 * <p>
 * 商品表 服务类
 * </p>
 *
 * @author lrz
 * @since 2022-09-28
 */
public interface GoodInfoService extends IService<GoodInfo> {

    boolean addGoodInfo(GoodsInfoAOUForm goodsInfoAOUForm);

    boolean deleteGoods(Integer goodId);

    Page<GoodsInfoDto> findGoodsInfo(GoodsInfoFindForm goodsInfoFindForm);

    GoodsCarAndAttachDto findGoodsInfoByGoodId(Integer goodId);

    List<CarDetailsTypeBrandDto> loadAllCars();

    List<GoodsInfoByServiceAndCarDto> loadGoodsByServiceAndCar(Integer serviceId, Integer carDetailId) throws JsonProcessingException;
}
